From e74c655016982272b72dff318b11602b0d5b099a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 19 May 2019 04:41:38 +0000 Subject: [PATCH] wayland: Make popups work more than once The change to keep some server resources around until destroy was causing us to not recreate the right things when a surface is hidden and then shown again. Make sure to recreate everything. --- gdk/wayland/gdksurface-wayland.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index c192c3b09d..72622e0170 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -2514,12 +2514,16 @@ gdk_wayland_surface_map (GdkSurface *surface) impl->mapped = TRUE; } +static void gdk_wayland_surface_destroy_surface (GdkSurface *surface); + static void gdk_wayland_surface_show (GdkSurface *surface, gboolean already_mapped) { GdkSurfaceImplWayland *impl = GDK_SURFACE_IMPL_WAYLAND (surface->impl); + gdk_wayland_surface_destroy_surface (surface); + if (!impl->display_server.wl_surface) gdk_wayland_surface_create_surface (surface); -- 2.30.2